#!/bin/bash

echo "=== Jeecg Boot 项目快速启动 ==="

# 1. 设置环境变量
echo "1. 设置环境变量..."
source ./env-config.sh

# 2. 编译项目
echo "2. 编译项目..."
mvn clean compile -DskipTests

if [ $? -eq 0 ]; then
    echo "编译成功！"
else
    echo "编译失败，请检查错误信息"
    exit 1
fi

# 3. 启动应用
echo "3. 启动应用..."
echo "应用将在 http://localhost:8080/jeecg-boot/ 启动"
echo "按 Ctrl+C 停止应用"
echo ""

cd jeecg-module-system/jeecg-system-start
mvn spring-boot:run 